#include <REGX52.H>
#include "MatrixKey.h"
#include "Digital_tube.h"
#include "Delay.h"
void main()
{
	unsigned char Key_Num;
	unsigned char i = 0;
	unsigned char Key_Num_Buffer[]={0,0};
	while (1)
	{
		Key_Num = MatrixKey_Num();
		if (Key_Num != 0)
		{
			if (Key_Num == 1)
			{
				i++;

			}
			if(Key_Num==2){
				i=0;
			}
		}
		if(i>=100){
			i=0;
		}
		Key_Num_Buffer[0] = i / 10;
		Key_Num_Buffer[1] = i % 10;
		Digital_tube_Display(0,Key_Num_Buffer[0]);
		Digital_tube_Display(1, Key_Num_Buffer[1]);
	}
}